<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>清除字符串内所有⾮英⽂字⺟字符</title>
</head>
<body>
    
</body>
</html>
<script>
        var arr = 'hrgierhgierhugiu1024';
        var reg = /[\u4e00-\u9fa5]|[0-9]/gi;        //可以输入数字和汉字的正则表达式
        console.log('清除前:'+arr);
        var Arr = arr.replace(reg,'');      //replace()替换与正则表达式匹配的字符串
        console.log('清除后:'+Arr)
</script>